<%-- 
    Document   : index
    Created on : Mar 19, 2012, 4:09:56 PM
    Author     : Kyle
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <LINK REL=StyleSheet HREF="./css/main.css" TYPE="text/css">
    </head>
    <body>
        <!--PRESENTATION DATA -->
        <c:set var="friends_names" scope="session">
            Waseem Mir,William Cheng
        </c:set>
        <c:set var="datetime" scope="session">
            12:52 PM, 2:03 AM
        </c:set>
        <c:set var="content" scope="session">
            Hey! I just thought I'd try out this comment system. I wanted to see if the text would wrap. Did it work? How do you like this site? It's pretty cool, huh? I think these guys deserve an A!!,
            Did you get that plan started?
        </c:set>
        <c:set var="fr_names" scope="session">
            Ron Burgundy, Jackie Chan
        </c:set>    
            
        <!--END PRESENTATION DATA-->
        
        
        <div class="filler">
            <div class="bg">
                <div class="main">
                    <div class="hdr">
                        <div class="logo">
                            <img src="./imgs/logo.png"/>
                        </div>

                        <div class="hdr_content_container">
                            <div class="acct_btns" style="margin-top : 10px;">
                                <div class="acct_btn">
                                    <a href="accountSettings.jsp">Account Settings</a>
                                </div>
                                <div class="acct_btn">
                                    <a href="LoginServlet?action=logout">Log Out</a>
                                </div>
                            </div>

                            <div class="acct_btns" style="margin-top: 75px;">
                                <div class="acct_btn">
                                    <a href="dashboard.jsp">Home</a>
                                </div>
                                <div class="acct_btn">
                                    <a href="calendar.jsp">Calendar</a>
                                </div>
                                <div class="acct_btn">
                                    <a href="plans.jsp">Plans</a>
                                </div>
                                <div class="acct_btn">
                                    <a href="data.jsp">Data</a>
                                </div>
                                <div class="acct_btn">
                                    <a href="friends.jsp">Friends</a>
                                </div>

                            </div>
                        </div>
                    </div>
                    <!-- hdr -->

                    <div class="container">
                        <div class="left_nav">
                            <c:forEach var="fr_name" items="${fr_names}" varStatus="loopCount">
                                <div class="friend_request_container">
                                    <div class="request">
                                        ${fr_name} would like to be your friend.
                                    </div>
                                    <div class="accept_decline_container">
                                        <div class="accept_link_container">
                                            <div class="accept_link">
                                                <a href="accept">Accept</a>
                                            </div>
                                        </div>
                                        <div class="decline_link_container">
                                            <div class="decline_link">
                                                <a href="decline">Decline</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </c:forEach>
                            <!--BEGIN A COMMENT -->
                            
                            <div class="comment_container">
                                <c:forEach var="comment" items="${todaysComments.commentList}">
                                    <div class="author_time">
                                        <div class="author">
                                            <span>${comment.senderName}</span>
                                        </div>
                                    </div>
                                    <hr/>
                                    <div class="content">
                                        <span>${comment.content}</span>
                                    </div>
                                </c:forEach>
                            </div>
                            <!-- END COMMENT -->
                           
                        </div>
                        <div class="page_body">
                            <div class="body_hdr">
                                <span>Today's tasks</span>
                            </div>
                            <c:forEach var="event" items="${todaysEvents.listEvents}" varStatus="loopCount">
                                <div class="event_container">
                                    <div class="event_content">
                                        <span>${event.eventName}</span>
                                    </div>
                                    <c:choose>
                                        <c:when test="${event.eventType eq 'static'}">
                                            <div class="event_buttons_container">
                                                <div class="done_button">
                                                    <a href="EventDone?type=static&eventId=${event.eventID}">Task Complete!</a>
                                                </div>
                                            </div>
                                        </c:when>
                                        <c:when test="${event.eventType eq 'metric'}">
                                            <div class="metric_event_input">
                                                <form name="metric" action="EventDone?type=metric&eventId=${event.eventID}" method="post">
                                                    <span>Value: <input name="value" type="text"/></span>
                                                    <input class="submit" type="submit" name="submit" value="Complete!"/>
                                                </form>
                                            </div>
                                        </c:when>  
                                        <c:otherwise>
                                            <div class="metric_event_input">
                                                <form name="bp_metric" action="EventDone?type=bp&eventId=${event.eventID}" method="post">
                                                    <span>BP: <input name="systolic" type="text"/> / <input name="diastolic" type="text"/></span>
                                                    <input class="submit" type="submit" name="submit" value="Complete!"/>
                                                </form>
                                            </div>
                                        </c:otherwise>
                                    </c:choose>
                                </div>
                            </c:forEach>
                        </div>
                    </div>
                    <!-- dashboard container -->
                </div>
                <!-- main -->
            </div>
            <!-- bg -->
        </div>
        <!-- filler -->
    </body>
</html>
